package cn.example.vip.mall.permission.controller;

import cn.example.vip.mall.permission.init.InitPermission;
import cn.example.vip.mall.util.RespResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/permission")
public class PermissionController {
	@Autowired
	private InitPermission initPermission;
	
	/**
	 * 更新role权限
	 */
	@GetMapping("/role/update")
	public RespResult updateRole() {
		initPermission.updateRolePermission();
		System.out.println("-----刷新Role权限");
		return RespResult.ok();
	}
}
